package com.funo.wcity.app.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.funo.wcity.app.dao.TblemployeesDAO;
import com.funo.wcity.app.service.TblemployeesService;
import com.funo.wcity.app.utils.StringUtil;

@Service("tblemployeesService")
public class TblemployeesServiceImpl implements TblemployeesService {
    @Resource(name="tblemployeesDAO")
    private  TblemployeesDAO tblemployeesDAO;
    
	public String getTblemployeesIdStr(String idEmployees) {
		StringBuffer sb=new StringBuffer(idEmployees);
		while(true){
			String str=employeesIdStr(idEmployees);
			if(!StringUtil.isEmpty(str)){
				sb.append(",").append(str);
			}else{
				break;
			}
			idEmployees=str;
		}
		return sb.toString();
	}

	
	//===============================================
	//================辅助方法========================
	//===============================================
	private  String employeesIdStr(String idEmployees){
		return this.tblemployeesDAO.getTblemployeesId(idEmployees);
	}
}
